﻿@{
    Layout = null;
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>@{@WorkContext.ShopConfig.SiteTitle}</title>
    @Html.Raw(WorkContext.ShopConfig.SEOKeyword)
    @Html.Raw(WorkContext.ShopConfig.SEODescription)
    <link href="@{@WorkContext.CSSCDN}/themes/default/css/base.css" rel="stylesheet" type="text/css" />
    <link href="@{@WorkContext.CSSCDN}/themes/default/css/home.css" rel="stylesheet" type="text/css" />
    <script src="@{@WorkContext.ScriptCDN}/scripts/jquery.js" type="text/javascript"></script>
    <script src="@{@WorkContext.ScriptCDN}/scripts/common.js" type="text/javascript"></script>
    <script src="@{@WorkContext.ScriptCDN}/scripts/jquery.soChange.js" type="text/javascript"></script>
    <script type="text/javascript">
        uid = @WorkContext.Uid;
        isGuestSC = @WorkContext.ShopConfig.IsGuestSC;
        scSubmitType = @WorkContext.ShopConfig.SCSubmitType;
    </script>
</head>
<body>
@Html.Partial("_header")
<script type="text/javascript">
    //移除事件处理
    $("#categorys").unbind();
    $("#categorysCon").removeClass("hide");
</script>

<div id="index1" class="box">
<div class="indexPic left">
    @{List<AdvertInfo> bannerList = Adverts.GetAdvertList(45);}
	<ul>
    @foreach (AdvertInfo info in bannerList)
    {
		<li><a href="@info.Url"><img src="@{@WorkContext.ImageCDN}/upload/adv/@info.Image" width="670px" height="240px"/></a></li>
    }
	</ul>
	<div class="indexPicBT">
        @for (int i = 1; i <= bannerList.Count; i++)
        {
            <a href="#">@i</a>
        }
        <div class="clear"></div>
    </div>
    @if (bannerList.Count > 1)
    {
        <script type="text/javascript">
            $("#index1 .indexPic li").soChange({
                thumbObj:"#index1 .indexPicBT a",
                thumbNowClass:"hot",
                changeTime:4200,
                autoChange:true,
                slideTime:300
            });
        </script>
    }
</div>
<div class="gonggao right">
<h2>通知公告<a href="@Url.Action("list", "news")" class="more">更多公告></a></h2>
<ul class="textList">
    @{DataTable homeNewsList = News.GetHomeNewsList(0, 7);}
    @foreach (DataRow row in homeNewsList.Rows)
    {
        <li><a href="@Url.Action("details", "news", new RouteValueDictionary { { "newsId", row["newsid"] } })">@row["title"]</a></li>
    }
</ul>
</div>
<div class="clear"></div>
</div>

<!-- 1楼 -->
<div id="floor1" class="floor box">
<h2 class="floorT">
<b>1F</b>工程机械
<ul>
    <li><a href="javascript:void(0)" class="hot">压路机</a></li>
    <li><a href="javascript:void(0)">平地机</a></li>
    <li><a href="javascript:void(0)">挖掘机</a></li>
    @*<li><a href="javascript:void(0)">拖拉机</a></li>*@
    <div class="clear"></div>
</ul>
@*<div class="floorBt"><a href="#">压路机</a><a href="#">平地机</a><a href="#">挖掘机</a><a href="#">拖拉机</a></div>*@
<div class="clear"></div>
</h2>
<div class="floorL left">
<ul>
    @{
        List<AdvertInfo> floor1AdvertList1 = Adverts.GetAdvertList(10);
     }
     @foreach (AdvertInfo info in floor1AdvertList1)
     { 
    <li><a href="@info.Url" class="hot">@info.Title</a></li>
     }
    <div class="clear"></div>
</ul>
    @{
        List<AdvertInfo> floor1AdvertList2 = Adverts.GetAdvertList(11);
     }
     @if (floor1AdvertList2.Count > 0)
     { 
    <a href="@floor1AdvertList2[0].Url" class="floorAD"><img src="@{@WorkContext.ImageCDN}/upload/adv/@floor1AdvertList2[0].Image" width="202" height="155" /></a> 
     }
</div>
<div class="floorR right">
<div class="floorCon">
<ul>
    @{
        List<AdvertInfo> floor1AdvertList3 = Adverts.GetAdvertList(12);
     }
     @foreach (AdvertInfo info in floor1AdvertList3)
     {
    <li><a href="@info.Url"><img src="@{@WorkContext.ImageCDN}/upload/adv/@info.Image" width="236" height="236" /><em>@info.ExtField1</em><b>¥@info.ExtField2<s>¥@info.ExtField3</s></b></a></li>
     }
</ul>
</div>
</div>
<div class="floorR right hide">
<div class="floorCon">
<ul>
    @{
        List<AdvertInfo> floor1AdvertList4 = Adverts.GetAdvertList(13);
     }
     @foreach (AdvertInfo info in floor1AdvertList4)
     {
    <li><a href="@info.Url"><img src="@{@WorkContext.ImageCDN}/upload/adv/@info.Image" width="236" height="236" /><em>@info.ExtField1</em><b>¥@info.ExtField2<s>¥@info.ExtField3</s></b></a></li>
     }
</ul>
</div>
</div>
<div class="floorR right hide">
<div class="floorCon">
<ul>
    @{
        List<AdvertInfo> floor1AdvertList5 = Adverts.GetAdvertList(14);
     }
     @foreach (AdvertInfo info in floor1AdvertList5)
     {
    <li><a href="@info.Url"><img src="@{@WorkContext.ImageCDN}/upload/adv/@info.Image" width="236" height="236" /><em>@info.ExtField1</em><b>¥@info.ExtField2<s>¥@info.ExtField3</s></b></a></li>
     }
</ul>
</div>
</div>
<div class="floorR right hide">
<div class="floorCon">
<ul>
    @{
        List<AdvertInfo> floor1AdvertList6 = Adverts.GetAdvertList(15);
     }
     @foreach (AdvertInfo info in floor1AdvertList6)
     {
    <li><a href="@info.Url"><img src="@{@WorkContext.ImageCDN}/upload/adv/@info.Image" width="236" height="236" /><em>@info.ExtField1</em><b>¥@info.ExtField2<s>¥@info.ExtField3</s></b></a></li>
     }
</ul>
</div>
</div>
<div class="clear"></div>
</div>
<script type="text/javascript">
    $(function(){
        $("#floor1 h2 ul li a").mouseover(function(){
            var aList = $("#floor1 h2 ul li a");
            var divList = $("#floor1 .floorR");
            var index = aList.index(this);

            aList.removeClass("hot");
            $(this).addClass("hot");

            divList.addClass("hide");
            divList.eq(index).removeClass("hide");
        })
    })
</script>
@*2楼广告*@
<!-- 2楼 -->
<div id="floor2" class="floor box">
    <h2 class="floorT">
        <b>2F</b>农业机械
        <ul>
            <li><a href="javascript:void(0)" class="hot">拖拉机</a></li>
            @*<li><a href="javascript:void(0)">收货机</a></li>
            <li><a href="javascript:void(0)">压捆机</a></li>
            <li><a href="javascript:void(0)">收割机</a></li>*@
            <div class="clear"></div>
        </ul>
        @*<div class="floorBt"><a href="#">拖拉机</a><a href="#">收货机</a></div>*@
        <div class="clear"></div>
    </h2>
    <div class="floorL left">
        <ul>
            @{
                List<AdvertInfo> floor2AdvertList1 = Adverts.GetAdvertList(16);
            }
            <AdvertInfo>
                @foreach (AdvertInfo info in floor2AdvertList1)
                {
                    <li><a href="@info.Url" class="hot">@info.Title</a></li>
                }
                <div class="clear"></div>
            </AdvertInfo>
        </ul>
        @{
            List<AdvertInfo> floor2AdvertList2 = Adverts.GetAdvertList(17);
        }<AdvertInfo>
            @if (floor2AdvertList2.Count > 0)
            {
                <a href="@floor2AdvertList2[0].Url" class="floorAD"><img src="@{@WorkContext.ImageCDN}/upload/adv/@floor2AdvertList2[0].Image" width="202" height="155" /></a>
}
        </AdvertInfo>
    </div>
    <div class="floorR right">
        <div class="floorCon">
            <ul>
                @{
                    List<AdvertInfo> floor2AdvertList3 = Adverts.GetAdvertList(18);
                }
                <AdvertInfo>
                    @foreach (AdvertInfo info in floor2AdvertList3)
                    {
                        <li><a href="@info.Url"><img src="@{@WorkContext.ImageCDN}/upload/adv/@info.Image" width="236" height="236" /><em>@info.ExtField1</em><b>¥@info.ExtField2<s>¥@info.ExtField3</s></b></a></li>
}
                </AdvertInfo>
            </ul>
        </div>
    </div>
    <div class="floorR right hide">
        <div class="floorCon">
            <ul>
                @{
                    List<AdvertInfo> floor2AdvertList4 = Adverts.GetAdvertList(19);
                }
                <AdvertInfo>
                    @foreach (AdvertInfo info in floor2AdvertList4)
                    {
                        <li><a href="@info.Url"><img src="@{@WorkContext.ImageCDN}/upload/adv/@info.Image" width="236" height="236" /><em>@info.ExtField1</em><b>¥@info.ExtField2<s>¥@info.ExtField3</s></b></a></li>
}
                </AdvertInfo>
            </ul>
        </div>
    </div>
    <div class="floorR right hide">
        <div class="floorCon">
            <ul>
                @{
                    List<AdvertInfo> floor2AdvertList5 = Adverts.GetAdvertList(20);
                }
                <AdvertInfo>
                    @foreach (AdvertInfo info in floor2AdvertList5)
                    {
                        <li><a href="@info.Url"><img src="@{@WorkContext.ImageCDN}/upload/adv/@info.Image" width="236" height="236" /><em>@info.ExtField1</em><b>¥@info.ExtField2<s>¥@info.ExtField3</s></b></a></li>
}
                </AdvertInfo>
            </ul>
        </div>
    </div>
    <div class="floorR right hide">
        <div class="floorCon">
            <ul>
                @{
                    List<AdvertInfo> floor2AdvertList6 = Adverts.GetAdvertList(21);
                }
                <AdvertInfo>
                    @foreach (AdvertInfo info in floor2AdvertList6)
                    {
                        <li><a href="@info.Url"><img src="@{@WorkContext.ImageCDN}/upload/adv/@info.Image" width="236" height="236" /><em>@info.ExtField1</em><b>¥@info.ExtField2<s>¥@info.ExtField3</s></b></a></li>
}
                </AdvertInfo>
            </ul>
        </div>
    </div>
    <div class="clear"></div>
</div>
<script type="text/javascript">
$(function(){
    $("#floor2 h2 ul li a").mouseover(function(){
        var aList = $("#floor2 h2 ul li a");
        var divList = $("#floor2 .floorR");
        var index = aList.index(this);

        aList.removeClass("hot");
        $(this).addClass("hot");

        divList.addClass("hide");
        divList.eq(index).removeClass("hide");
    })
})
</script>
@Html.Partial("_footer")
</body>
</html>

